package cn.kgc.service.impl;

import cn.kgc.mapper.RevenueMapper;
import cn.kgc.pojo.Revenue;
import cn.kgc.service.RevenueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @author 谢里夫老师
 * @version 1.0
 * @date 2022/10/15 - 9:36
 */



@Service
public class RevenueServiceImpl implements RevenueService {

    @Autowired
    private RevenueMapper revenueMapper;


    //根据订单号查询
    @Override
    public List<Revenue> seleRevenueByNum(Integer currentPage, Integer limit, String orderNum) {
        return revenueMapper.seleRevenueByNum(currentPage,limit,orderNum);
    }

    //计算行数
    @Override
    public int getTotalCount(String orderNum) {
        return revenueMapper.getTotalCount(orderNum);
    }

    @Override
    public List<HashMap<Integer, String>> srBaoBiao() {
        return revenueMapper.srBaoBiao();
    }

    //新增数据
    @Override
    public int addRevenue(Revenue revenue) {
        return revenueMapper.addRevenue(revenue);
    }


}
